home *** CD-ROM | disk | FTP | other *** search
- This is something I threw together to allow various non-BSD systems
- to print over the network to print queues on BSD-style systems
- (like SunOS and Ultrix and...). Basically, it's a standalone clone
- of the BSD "lpr" command -- like BSD lpr but it doesn't need a print
- spooler on the local machine.
-
- You do have to have a BSD-style TCP implementation on your machine
- (with socket(), bind() and that sort of stuff), and you have to have
- access to an lpd server somewhere on the network.
-
- It's written in ANSI-ish C, because I find that it's a lot easier to
- get the bugs out of my programs when I use function prototypes. I
- considered fixing this to work with Classic C, but I'm too busy working
- on my thesis right now, and several people have asked for this. If
- you have GNU cc or some other ANSI C compiler, it should just compile
- and run for you. If you don't have an ANSI C compiler, but you do
- understand a little bit of C, you probably won't have too much trouble
- getting it running. Otherwise, perhaps some kind soul will take the
- time to make the required changes and send out patches.
-
- At one time or another, I have tested this on SCO ODT 1.0, SunOS 4.1,
- Ultrix 3.x, 4.3 BSD, and on a Stardent Titan running some variant of
- SysV. I think it should still work in all of these environments. I
- always used Sun machines as printer servers, but I would expect this
- program to work with any server running 4.2BSD or 4.3BSD-derived code.
-
- * Warranty:
-
- There is NO WARRANTY for this software, not even for merchantability
- nor for fitness for any particular purpose. Anyone who installs or uses
- this software, does so entirely at his or her own risk. The author
- will not be responsible for any ill consequences of the installation
- or use of this software, no matter how terrible.
-
- * Copyright, use and redistribution:
-
- The source code for this program is Copyright 1990, 1991 by Keith Moore
-
- Use of this program and distribution of the code in either source or
- compiled binary form are governed by the GNU General Public License,
- Version 1. See the file LICENSE for details.
-
- * Installation:
-
- "make install" should do the trick. You may have to edit the Makefile
- to change the installation directory. Install the man page by hand,
- if your system supports these. The file "lpr.cat" is a preformatted
- man page, in case your system does not support nroff. If your system
- has a man command, you may be able to copy the lpr.cat file into an
- appropriate directory with an appropriate name so that "man lpr" will
- work.
-
- The program is installed set-uid to root, which is necessary so that lpr
- can bind to a privileged TCP port. This should not present a security
- risk since the first thing that the program does is to create the socket
- and bind it to the privileged port, after which it immediately disables
- its privileges. All file opens, reads, etc., are then done with the
- invoking user's normal privileges.
-
- lpr expects that the environment variable LPD_SERVER will be set to
- the hostname of a machine which has a working BSD-style line printer
- daemon. Your host must have permission to print on the server's
- print queues -- generally this is done by editing either /etc/hosts.lpd
- or /etc/hosts.equiv (preferably the former) on the server.
-
- * Miscellaneous:
-
- There are several stub routines in here to add support for running
- this program under VMS, or for using DECnet instead of TCP. Don't
- worry about them unless you feel like adding the actual code to do
- this. The use_dev_printer code was an early attempt at trying to use
- the named socket /dev/printer to spool files -- thus allowing lpr to
- work without being installed set-uid. This did not work because of
- bugs in the BSD server code.
-
- If you find bugs and can supply fixes, please let me know and I'll try
- and have the fixes incorporated into a future release.
-
- Keith Moore
- moore@cs.utk.edu
-